package com.itheima.controller;

import com.itheima.factory.BeanFactory;
import com.itheima.service.UserService;

/**
 * @author GG
 * @version 1.0
 * @date 2021/10/30 8:56
 */
public class TestMain {

    //模拟web层
    public static void main(String[] args) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
//        UserService userService=new UserServiceImpl();
//        UserService userService= ServiceFactory.getBean();
        UserService userService= (UserService) BeanFactory.getBean("userService");
        userService.add();
    }

}
